package com.baizhi.springbootday0101.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.Signature;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class Before {

	@org.aspectj.lang.annotation.Before("execution(* com.baizhi.springbootday0101.service.*.*(..))")
	public void before(JoinPoint joinPoint){
		Signature signature = joinPoint.getSignature();
		String name = signature.getName();
		System.out.println("前置曾强");
	}

	@After("execution(* com.baizhi.springbootday0101.service.*.*(..))")
	public void after(JoinPoint joinPoint){
		System.out.println("后置增强");
	}
}
